(c-outline-level):
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 4 Apr 2001 20:13:07 +0000 (20:13 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 4 Apr 2001 20:13:07 +0000 (20:13 +0000)
Bind buffer-invisibility-spec.  Originally from Dave Love, but
got lost when incorporating version 5.26.

lisp/progmodes/cc-cmds.el

index ae905c08d8673faf249bbf100079c8c43eaa82d5..70195e4cb569359c4270b07bbf64f4929096d0c4 100644 (file)
@@ -1283,9 +1283,11 @@ sentence motion in or near comments and multiline strings."
 \f
 ;; used by outline-minor-mode
 (defun c-outline-level ()
-  (save-excursion
-    (skip-chars-forward "\t ")
-    (current-column)))
+  ;; This so that `current-column' DTRT in otherwise-hidden text.
+  (let (buffer-invisibility-spec)
+    (save-excursion
+      (skip-chars-forward "\t ")
+      (current-column))))
 
 \f
 (defun c-up-conditional (count)